//
//  KHNetworkEngine.h
//  KHealth
//
//  Created by wang hongxi on 13-10-12.
//  Copyright (c) 2013年 Beijing Dayactive CO. LTD. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MKNetworkEngine.h"
#import "NSError+Additions.h"

//#if KHTEST
//    #define KHServerBase @"218.247.224.15"
//#else
#define KHServerBase @"www.720haokan.com"
//#endif
//http://localhost:8080/meicheng/web/phone.htm?action=statistcsOrders&begintime=2014-03-01&endtime=2014-04-01
//http://localhost:8080/meicheng/web/phone.htm?action=statisticsGoods
//http://localhost:8080/meicheng/web/phone.htm?action=statisticsTopGoods

#define kHAppErrorDomain @"应用错误"
#define kHErrorParse @"解析数据出错"

@interface KHError : NSError
@property (nonatomic,copy) NSString *reason;
-(id)initWithMKNetworkOperation:(MKNetworkOperation *)op error:(NSError *)error;
@end

@interface KHNetworkEngine : MKNetworkEngine {
}

typedef void (^CommonResponseBlock)(BOOL changed);
typedef void (^ListResponseBlock)(NSMutableArray *array);
//typedef void (^ProList)

@property (nonatomic,assign) BOOL showError;
-(void)showPrompt:(NSString *)msg;
-(BOOL)checkError:(id)resp;
@end
